home *** CD-ROM | disk | FTP | other *** search
- #!/usr/sbin/perl
-
- $ENV{'DISPLAY'} = "localhost:0.0";
- $ENV{'HOME'} = "/tmp";
-
- $running= `/usr/bin/ps -e | /usr/bin/grep bzfs`;
-
- if ($running) {
- open(CMD, "/usr/bin/X11/xconfirm -header \"Bzflag\" -B \"Stop Server\" -t \"The bzflag network server is running.\" -t \"Click stop to terminate.\" -icon info|");
- } else {
- open(CMD, "/usr/demos/General_Demos/bzflag/bzfs>/dev/null&|");
- close(CMD);
- open(CMD, "/usr/bin/X11/xconfirm -header \"Bzflag\" -B \"Stop Server\" -t \"The bzflag network server is running.\" -t \"Click stop to terminate.\" -icon info|");
- read(CMD, $out, 100);
- close(CMD);
- `/sbin/killall bzfs`;
- exit 0;
- }
-